package com.sky.service;

import com.sky.dto.OrdersPageQueryDTO;
import com.sky.dto.OrdersPaymentDTO;
import com.sky.dto.OrdersSubmitDTO;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

/**
 * @program: sky-take-out
 * @description:
 * @author: fmp
 * @create: 2023-04-09 15:10
 * @Version 1.0
 **/
public interface OrderService {
    //分页查询历史订单
    PageResult selectHistoryOrders(OrdersPageQueryDTO ordersPageQueryDTO);
    //用户下单
    OrderSubmitVO submitOrders(OrdersSubmitDTO ordersSubmitDTO);
    /**
     * 用户请求支付功能
     *
     * @param ordersPaymentDTO 用于请求支付相关信息(订单号码/付款方式)
     * @return 微信支付基础信息VO
     */
    OrderPaymentVO pay(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功功能(更改订单状态)
     * @param outTradeNo 订单编号
     */
    void paySuccess(String outTradeNo);
      //查询订单详情
    OrderVO getOrderDetails(Long id);
    //用户取消订单
    void cancelOrder(Long orderId);
    //再来一单
    void repetitionOrder(Long orderId);
}
